Skip to content

docs: fix execution_graph README Quick Start and test READMEs in CI#92

Closed
no-materials wants to merge 1 commit into
forest-rs:mainfrom
no-materials:docs/readme-quickstart-doctests
Closed

docs: fix execution_graph README Quick Start and test READMEs in CI#92
no-materials wants to merge 1 commit into
forest-rs:mainfrom
no-materials:docs/readme-quickstart-doctests

Conversation

@no-materials
Copy link
Copy Markdown
Contributor

Fix the execution_graph README Quick Start (missing ? → two E0308s), and guard both crates' READMEs with a #[cfg(doctest)] include so CI's cargo test --doc keeps them compiling.

… in CI

The execution_graph README Quick Start dropped `?` on `add_node` and `set_input_value` (both return `Result`), so the `fn main()` example failed to compile with two E0308s. A reader's first copy-paste from the docs would not build, while the lib.rs doctest stayed correct because only it was exercised by CI.

To stop this drift recurring, include each crate's README.md as a `#[cfg(doctest)]` item so the existing `cargo test --doc --workspace` step compiles the Quick Start. The item exists only under `cfg(doctest)`, so it never appears in rendered docs and is invisible to clippy and normal builds. execution_tape's README already compiled; its guard is purely protective.
@waywardmonkeys
Copy link
Copy Markdown
Contributor

I think I'd prefer using cargo rdme like we do in other repos and having that checked in CI.

@no-materials
Copy link
Copy Markdown
Contributor Author

I think I'd prefer using cargo rdme like we do in other repos and having that checked in CI.

Agreed, I'll open a dedicated PR for that. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants